# datetime : 12/9/2024 下午9:50
# -*-coding : utf-8 -*-
# Author : 油条测试
'''
读取json文件数据
'''
import json


#
# with open('..//data_config/GetDataInfo.json') as f:
# 	read = json.load(f)
# 	print(read)
# 	print(read['GetDataInfo'])

class Operate_Json():
    def __init__(self, fileName=None):
        if fileName != None:
            self.fileName = fileName
        else:
            self.fileName = '..//data_config/GetDataInfo.json'

    # 读取json文件
    def read_json(self):
        with open(self.fileName) as f:
            read = json.load(f)
            return read

    # 获取json数据
    def read_value_by_key(self, key):
        return self.read_json()[key]
